import java.util.ArrayList;
import java.util.List;

class StageNotifier {
    private final List<StageObserver> observers = new ArrayList<>();

    public void addObserver(StageObserver observer) {
        observers.add(observer);
    }

    public void notifyStageChange(int newStage) {
        for (StageObserver observer : observers) {
            observer.onStageChanged(newStage);
        }
    }
}
